package com.eliza.navs.activity

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.navigation.NavController
import androidx.navigation.Navigation
import androidx.navigation.ui.NavigationUI.setupActionBarWithNavController
import com.eliza.navs.R


class FgActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main_fg)
/*
* NavController 接管 fragment
* */
        val navController: NavController = Navigation.findNavController(this, R.id.main_fg_fg)
        setupActionBarWithNavController(this, navController)
    }
/*
* 左上角 返回键
* */
    override fun onSupportNavigateUp(): Boolean {
        val navController = Navigation.findNavController(this, R.id.main_fg_fg)
        return navController.navigateUp()

    }

}